﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


using SpiritEngine.Source.ApplicationLayer;


namespace SpiritEngine.Source.EngineBuilder
{
    public class EngineBuilder
    {
        #region Constants/Enums

        #endregion


        #region Structs

        #endregion


        #region Static Member Variables and Methods

        #endregion


        #region Member Variables

        #endregion


        #region Events/Delegates

        #endregion


        #region Constructors and Destructors (aka Finalizers)

        #endregion


        #region Non-Public Methods

        // This section is for methods that are declared as private, protected, protected internal, or internal.

        #endregion


        #region Public Methods

        /// <summary>
        /// This function is called by the Source.Engine class.  It creates a Windows version of the Engine and takes no command line arguments.
        /// 
        /// Note that you will need to call the Initialize() method on the returned EngineBase object.
        /// </summary>
        /// <returns>The constructed EngineBase object.</returns>
        public ISE_EngineBase BuildEngine_Windows()
        {
            return BuildEngine_Windows(null);
        }


        /// <summary>
        /// This function is called by the Source.Engine class.  It creates a Windows version of the Engine and takes command line arguments
        /// and passes them into the EngineBase object it creates.
        /// 
        /// Note that you will need to call the Initialize() method on the returned EngineBase object.
        /// </summary>
        /// <returns>The constructed EngineBase object.</returns>
        public ISE_EngineBase BuildEngine_Windows(string[] commandLineArgs)
        {
            ISE_EngineBase engineBase;


            if (commandLineArgs != null)
                engineBase = new EngineBase(commandLineArgs);
            else
                engineBase = new EngineBase();


            engineBase.SetComponent_EngineCore(new EngineCore.EngineCore(engineBase));
            engineBase.SetComponent_ServicesManager(new ServicesManager(engineBase));

            return engineBase;
        }

        #endregion


        #region Interface Methods

        // This section is for methods that are part of the interfaces that the class implements.

        #endregion


        #region Event Invocation Methods

        // This section is for methods that invoke the events of this class.  For example:
        //
        // Invoke the Changed event; called whenever list changes
        // protected virtual void OnChanged(EventArgs e) 
        // {
        //		if (Changed != null)
        //			Changed(this, e);
        // }

        #endregion


        #region Operators

        #endregion


        #region Debug Methods

        // This will compile the debug code only if the DEBUG symbol is defined.
        // To define this symbol for all source files in the project, open the Project Properties,
        // and go to the Build tab.  Check the "Define DEBUG constant" checkbox.  With this box checked,
        // the compiler will automatically define the symbol DEBUG.
#if (DEBUG)
        // put all debug methods in here...
#endif

        #endregion


        #region Properties

        #endregion

    }
}
